com.highdeal.pnr.hci
Class CounterSnapshotModel

java.lang.Object
  extended by com.highdeal.pnr.hci.CounterSnapshotModel
All Implemented Interfaces:
XMLMarshallable, java.lang.Comparable<CounterSnapshotModel>

public class CounterSnapshotModel
extends java.lang.Object
implements XMLMarshallable, java.lang.Comparable<CounterSnapshotModel>

This class represents a daily counter snapshot; Inside the snapshot, the counters are organized in a structure similar to the associated subscription (root subscription, sub-subscription(s), charge activation(s)).

A snapshot contains the following information:

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="counterSnapshot">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="subscriptionSnapshotHolder" minOccurs="0" maxOccurs="1" />
     </xs:sequence>
     <xs:attribute name="date" type="xs:date" />
     <xs:attribute name="numberOfDaysInThePast" type="xs:int" />
     <xs:attribute name="minimalTransactionSetId" type="xs:long" />
     <xs:attribute name="inError" type="xs:boolean" />
   </xs:complexType>
 </xs:element>


Field Summary
static java.lang.String MODEL_NAME
          The XML name of the object: counterSnapshot
 
Constructor Summary
CounterSnapshotModel()
          Builds an empty CounterSnapshotModel object
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 int compareTo(CounterSnapshotModel that)
          Compare this counter snapshot with the one specified in argument, using their date
 java.util.Date getDate()
          Gets the date of the counter snapshot
 long getMinimalTransactionSetId()
          Gets the lowest transaction set identifier which was generated by a rating performed on the counter snapshot
 int getNumberOfDaysInThePast()
          Gets the maximum number of days in the past for the counter snapshot (corresponds to the difference between the date of the counter snapshot and the consumption date of the oldest late CDR rated on the counter snapshot).
 SubscriptionSnapshotHolderModel getRootSubscription()
          Gets the subscription snapshot holder corresponding to the root subscription
 boolean isInError()
          Gets whether the counter snapshot is erroneous
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setDate(java.util.Date date)
          Sets the date of the counter snapshot
 void setInError(boolean inError)
          Sets whether the counter snapshot is erroneous
 void setMinimalTransactionSetId(long minimalTransactionSetId)
          Sets the lowest transaction set identifier which was generated by a rating performed on the counter snapshot
 void setNumberOfDaysInThePast(int numberOfDaysInThePast)
          Sets the maximum number of days in the past for the counter snapshot (corresponds to the difference between the date of the counter snapshot and the consumption date of the oldest late CDR rated on the counter snapshot).
 void setRootSubscription(SubscriptionSnapshotHolderModel rootSubscription)
          Sets the subscription snapshot holder corresponding to the root subscription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODEL_NAME

public static final java.lang.String MODEL_NAME
The XML name of the object: counterSnapshot

See Also:
Constant Field Values
Constructor Detail

CounterSnapshotModel

public CounterSnapshotModel()
Builds an empty CounterSnapshotModel object

Method Detail

getDate

public java.util.Date getDate()
Gets the date of the counter snapshot

Returns:
The date of the counter snapshot

setDate

public void setDate(java.util.Date date)
Sets the date of the counter snapshot

Parameters:
date - The date of the counter snapshot

getNumberOfDaysInThePast

public int getNumberOfDaysInThePast()
Gets the maximum number of days in the past for the counter snapshot (corresponds to the difference between the date of the counter snapshot and the consumption date of the oldest late CDR rated on the counter snapshot).

Returns:
The maximum number of days in the past for the counter snapshot

setNumberOfDaysInThePast

public void setNumberOfDaysInThePast(int numberOfDaysInThePast)
Sets the maximum number of days in the past for the counter snapshot (corresponds to the difference between the date of the counter snapshot and the consumption date of the oldest late CDR rated on the counter snapshot).

Parameters:
numberOfDaysInThePast - the maximum number of days in the past for the counter snapshot

getMinimalTransactionSetId

public long getMinimalTransactionSetId()
Gets the lowest transaction set identifier which was generated by a rating performed on the counter snapshot

Returns:
The lowest transaction set identifier which was generated by a rating performed on the counter snapshot

setMinimalTransactionSetId

public void setMinimalTransactionSetId(long minimalTransactionSetId)
Sets the lowest transaction set identifier which was generated by a rating performed on the counter snapshot

Parameters:
minimalTransactionSetId - The lowest transaction set identifier which was generated by a rating performed on the counter snapshot

isInError

public boolean isInError()
Gets whether the counter snapshot is erroneous

Returns:
true if the counter snapshot is erroneous, false otherwise

setInError

public void setInError(boolean inError)
Sets whether the counter snapshot is erroneous

Parameters:
inError - true if the counter snapshot is erroneous, false otherwise

getRootSubscription

public SubscriptionSnapshotHolderModel getRootSubscription()
Gets the subscription snapshot holder corresponding to the root subscription

Returns:
The subscription snapshot holder corresponding to the root subscription

setRootSubscription

public void setRootSubscription(SubscriptionSnapshotHolderModel rootSubscription)
Sets the subscription snapshot holder corresponding to the root subscription

Parameters:
rootSubscription - The subscription snapshot holder corresponding to the root subscription

compareTo

public int compareTo(CounterSnapshotModel that)
Compare this counter snapshot with the one specified in argument, using their date

Specified by:
compareTo in interface java.lang.Comparable<CounterSnapshotModel>
Returns:
A negative integer, zero, or a positive integer as the date of this counter snapshot is less than, equal to, or greater than the date of the specified counter snapshot

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XML output to marshal the object into

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)